@isTest
private class POTestClass {

    static testMethod void testPO() {
    	
    	//Create a list of PurchaseOrders using the Interface instead of class
		List<PurchaseOrder> poList = new List<PurchaseOrder>();
		// Add the elements to the list
		poList.add(new EmployeePO(100, 'Employee PO Example', 1000.0)); // Added the Employee PO Object
		poList.add(new PartnerPO(200, 'Partner PO Example', 1000.0)); // Added the Partner PO Object
		poList.add(new EmployeePO(300, 'Employee PO Example', 10000.0)); // Added the employee PO Object
		poList.add(new PartnerPO(400, 'Partner PO Example', 10000.0)); // Added the Partner PO Object
		
		// Looping through based on the Interface instead of concerte class
		for(PurchaseOrder po : poList){
			po.printObject();
			po.applyDiscount();
			po.printObject();
		}
    }

	// Test the EmployeePO without worrying about the Interface
    @isTest static void testEmployeePO() {
    	
    	// Create an object of the EmployeePO using the no argument constructor
      	EmployeePO epo = new EmployeePO(); 
      	// call the setter methods to set the values
      	epo.setPoId(101);
		epo.setDescription('Employee PO Test Example');
		epo.setAmount(2000.00);
		// Call the business methods
		epo.printObject();
		epo.applyDiscount();
		epo.printObject();
    }
    
	// Test the PartnerPO without worrying about the Interface
    @isTest static void testPartnerPO() {
    	// Create an object of the PartnerPO using the no argument constructor
      	PartnerPO ppo = new PartnerPO();
      	// call the setter methods to set the values
      	ppo.setPoId(201);
		ppo.setDescription('Partner PO Test Example');
		ppo.setAmount(4000.00);
		ppo.printObject();
		ppo.applyDiscount();
		ppo.printObject();
    }
}